<?php
class MainClass
{
    
    public $DB;
    
    function   __construct()
    {
        $this->DB=new mysqli("localhost","root","","test");
    }
    
    function AddCategory()
    {
        $this->DB->query("INSERT INTO testname ('hellos') value (17) ") or die("Problem connecting2: ".$this->DB->error);
    }
    
    
    /*
    function updateCategory();
    function DeleteCategory();
    function ListCategory();
    
    
    function AddLink();
    function UpdateLink();
    function DeleteLink();
    function ListLink();
    function LinkDetails();
    */
}

$Obj=new MainClass();
$Obj->AddCategory();